package com.yuntai.pms.model.constants;

/**
 * @ClassName: ErrorCode
 * @Description: 统一网关错误编码定义
 * @author 王勇琳
 * @date 2017年6月7日 下午2:03:28
 */
public interface ErrorCode {

    String SUCCESS                                     = "10000";
    String SUCCESS_MSG                                 = "接口调用成功，调用结果请参考具体的API文档所对应的业务返回参数";

    String BAD_SERVER                                  = "20000";
    String BAD_SERVER_MSG                              = "服务不可用";
    String BAD_SERVER_DISPLAYMSG                       = "服务器繁忙，请稍后再试！";
    String SUB_UNKNOW_ERROR                            = "isp.unknow-error";
    String SUB_UNKNOW_ERROR_MSG                        = "服务暂不可用（业务系统不可用）";
    String GATEWAY_UNKNOW_ERROR                        = "aop.unknow-error";
    String GATEWAY_UNKNOW_ERROR_MSG                    = "服务暂不可用（网关自身的未知错误）";

    String INVALID_AUTH                                = "20001";
    String INVALID_AUTH_MSG                            = "授权权限不足";
    String INVALID_AUTH_TOKEN                          = "aop.invalid-auth-token";
    String INVALID_AUTH_TOKEN_MSG                      = "无效的访问令牌";

    //TODO 请继续按照http://114.215.173.137:8190/pages/viewpage.action?pageId=4637600 中的错误编码规范【分类】列举出来

    String REQUEST_MISSING                             = "40001";
    String REQUEST_MISSING_MSG                         = "缺少必选参数";
    String REQUEST_MISSING_APPID                       = "isv.missing-app-id";
    String REQUEST_MISSING_APPID_MSG                   = "缺少appId参数，检查请求参数，缺少app_id参数";
    String REQUEST_MISSING_METHOD                      = "isv.missing-method";
    String REQUEST_MISSING_METHOD_MSG                  = "缺少方法名参数, 请求参数里面必须要有method参数";
    String REQUEST_MISSING_FORMAT                      = "isv.missing-format";
    String REQUEST_MISSING_FORMAT_MSG                  = "缺少format参数, 请求参数里面必须要有format参数";
    String REQUEST_MISSING_CHARSET                     = "isv.missing-charset";
    String REQUEST_MISSING_CHARSET_MSG                 = "缺少charset参数, 请求参数里面必须要有charset参数";
    String REQUEST_MISSING_RANDOMSTR                   = "isv.missing-random_str";
    String REQUEST_MISSING_RANDOMSTR_MSG               = "缺少random_str参数, 请求参数里面必须要有random_str参数";
    String REQUEST_MISSING_SIGNATURE                   = "isv.missing-signature";
    String REQUEST_MISSING_SIGNATURE_MSG               = "缺少签名参数，检查请求参数，缺少sign参数";
    String REQUEST_MISSING_SIGNATURE_TYPE              = "isv.missing-signature-type";
    String REQUEST_MISSING_SIGNATURE_TYPE_MSG          = "缺少签名类型参数, 检查请求参数，缺少sign_type参数";
    String REQUEST_MISSING_TIMESTAMP                   = "isv.missing-timestamp";
    String REQUEST_MISSING_TIMESTAMP_MSG               = "缺少时间戳参数, 检查请求参数，缺少timestamp参数";
    String REQUEST_MISSING_VERSION                     = "isv.missing-version";
    String REQUEST_MISSING_VERSION_MSG                 = "缺少版本参数, 检查请求参数，缺少version参数";
    String REQUEST_MISSING_USERTOKEN                   = "isv.missing-user_token";
    String REQUEST_MISSING_USERTOKEN_MSG               = "缺少userToken参数, 检查请求参数，缺少user_token参数";
    String REQUEST_MISSING_TERMINAL_TYPE               = "isv.missing-terminal_type";
    String REQUEST_MISSING_TERMINAL_TYPE_MSG           = "缺少terminal_type参数, 检查请求参数，缺少terminal_type参数";
    String REQUEST_MISSING_BIZCONTENT                  = "isv.missing-biz-content";
    String REQUEST_MISSING_BIZCONTENT_MSG              = "缺少biz_content参数, 检查请求参数，缺少biz_content参数";

    String REQUEST_INVALID                             = "40002";
    String REQUEST_INVALID_MSG                         = "非法的参数";
    String REQUEST_INVALID_METHOD                      = "isv.invalid-method";
    String REQUEST_INVALID_METHOD_LIMIT_MSG            = "无效的method参数，请检查其长度";
    String REQUEST_INVALID_METHOD_RULE_MSG             = "无效的method参数，基础格式规则不正确";
    String REQUEST_INVALID_METHOD_REPEAT_MSG           = "无效的method参数，不同的单元段有重复";
    String REQUEST_INVALID_APP_ID                      = "isv.invalid-app-id";
    String REQUEST_INVALID_APP_ID_TYPE_MSG             = "无效的APP_ID参数，请检查其数据类型";
    String REQUEST_INVALID_APP_ID_AUTH_MSG             = "无效的APP_ID参数，非法的APP_ID或审核未通过";
    String REQUEST_INVALID_TIMESTAMP                   = "isv.invalid-timestamp";
    String REQUEST_INVALID_TIMESTAMP_MSG               = "无效的timestamp参数，请检查格式需要为yyyy-MM-dd HH:mm:ss";
    String REQUEST_INVALID_FORMAT                      = "isv.invalid-format";
    String REQUEST_INVALID_FORMAT_MSG                  = "无效的format参数，目前只支持json格式";
    String REQUEST_INVALID_USERTOKEN                   = "isv.invalid-userToken";
    String REQUEST_INVALID_USERTOKEN_AUTH_MSG          = "无效的UserToken参数，非法的UserToken或校验失败";
    String REQUEST_INVALID_APPSECRET                   = "isv.invalid-appSecret";
    String REQUEST_INVALID_APPSECRET_MSG               = "无效的AppSecret参数，请检查AppSecret是否已配置";
    String REQUEST_INVALID_SIGN                        = "isv.invalid-signature";
    String REQUEST_INVALID_SIGN_MSG                    = "无效的签名，请检查签名规则是否合法";
    String REQUEST_INVALID_BIZCONTENT_TYPE             = "isv.invalid-biz-content";
    String REQUEST_INVALID_BIZCONTENT_TYPE_MSG         = "无效的biz_content，请检查biz_content格式是否正确";

    String OPENAPI_BIZ_ERROR                           = "40003";
    String OPENAPI_BIZ_ERROR_MSG                       = "网关业务逻辑处理失败";
    String OPENAPI_BIZ_PARAM_ERROR                     = "openapi.error-biz-param-error";
    String OPENAPI_BIZ_PARAM_ERROR_MSG                 = "网关业务逻辑处理失败，网关内部业务参数错误";
    String OPENAPI_BIZ_USERTOKEN_ERROR                 = "openapi.error-check-userToken";
    String OPENAPI_BIZ_USERTOKEN_ERROR_MSG             = "网关业务逻辑处理失败，校验userToken业务处理错误";
    String OPENAPI_BIZ_APPID_ERROR                     = "openapi.error-check-appId";
    String OPENAPI_BIZ_APPID_ERROR_MSG                 = "网关业务逻辑处理失败，校验appId有效性错误";
    String OPENAPI_BIZ_SELECT_APPSECRET_ERROR          = "openapi.error-select-appSecret";
    String OPENAPI_BIZ_SELECT_APPSECRET_ERROR_MSG      = "网关业务逻辑处理失败，校验appSecret业务处理错误";
    String OPENAPI_VALIDATE_EMPTY                      = "aop.validate-empty-error";
    String OPENAPI_VALIDATE_EMPTY_MSG                  = "网关参数校验逻辑返回结果为空，请联系统一网关开发人员解决";
    String OPENAPI_BIZ_SAVEREQUESET_ERROR              = "openapi.save-identity-error";
    String OPENAPI_BIZ_SAVEREQUESET_ERROR_MSG          = "网关业务逻辑处理失败，身份认证申请业务保存业务错误";
    String OPENAPI_BIZ_DATEFORMAT_ERROR                = "openapi.dateformat-error";
    String OPENAPI_BIZ_DATEFORMAT_ERROR_MSG            = "网关业务逻辑处理失败，计算业务时间差时格式化错误";
    String OPENAPI_BIZ_BUILDUSER_ERROR                 = "openapi.builduser-error";
    String OPENAPI_BIZ_BUILDUSER_ERROR_MSG             = "网关业务逻辑处理失败，获取用户ID及手机号错误";
    String OPENAPI_BIZ_RESPONSESIGN_ERROR              = "openapi.responseSign-error";
    String OPENAPI_BIZ_RESPONSESIGN_ERROR_MSG          = "网关业务逻辑处理失败，响应结果时加签业务处理错误";

    String INSUFFICIENT_PERMISSIONS                    = "40006";
    String INSUFFICIENT_PERMISSIONS_MSG                = "权限不足";
    String INSUFFICIENT_ISV_PERMISSIONS                = "isv.insufficient-isv-permissions";
    String INSUFFICIENT_ISV_PERMISSIONS_MSG            = "ISV权限不足";
    String INSUFFICIENT_ISV_PERMISSIONS_METHOD_DISPLAY = "代理的商户没有当前接口权限";
    String INSUFFICIENT_ISV_PERMISSIONS_DATA_DISPLAY   = "代理的商户没有当前数据权限";
    String INSUFFICIENT_USER_PERMISSIONS               = "isv.insufficient-user-permissions";
    String INSUFFICIENT_USER_PERMISSIONS_MSG           = "用户权限不足";
    String INSUFFICIENT_USER_PERMISSIONS_DISPLAY       = "请检查配置的账户是否有当前接口权限";

}
